<?php $this->load->view('left_side.php'); ?>


<div class="middle-contenter">
    <div class='dashboard-contenter-header'>
        <a style='text-decoration: none;' href="<?php echo base_url(); ?>index.php/site/members_area/">Home &gt; </a>
        Store
    </div>
    <center>
    <table class="listdata">
        <thead>
            <tr>
                <th>Product Model</th>
                <th>Vendor Name</th>
                <th>Quantity</th>
                <th>Buying</th>
                <th></th>
                <th></th>
            </tr>
        </thead>
        <tbody>
    <?php 
        $total_amount = 0;
        foreach($listview as $item)
        {
            echo '<tr class="even">';
            echo '<td>'. $item->cs_product_model .'</td>';
            echo '<td><a href="'. base_url() .'index.php/admin/sim/flexi_listview/0/'. $item->cs_product_id .'">'. $item->cs_vendor_name .'</a></td>';
            echo '<td>'. $item->cs_product_quantity .'</td>';
            echo '<td>'. $item->cs_product_buying_price .'</td>';
            echo '<td><a class="edit-event" href="'. base_url() .'index.php/admin/sim/edit_flexi/'. $item->cs_store_id .'/"><img src="'. base_url() .'/images/edit.png"/></a> </td>';
            echo '<td><a class="delete-event" href="'. base_url() .'index.php/admin/sim/delete_flexi/'. $item->cs_store_id .'/"><img src="'. base_url() .'/images/delete.png"/></a> </td>';
            echo '</tr>';            
            $total_amount += $item->cs_product_buying_price;
        }
        
    ?>
        <tr class="even">
            <td colspan="3" align="left"><b>Total</b></td>
            <td colspan="3" align="left"><b><?=$total_amount?></b> &nbsp; TK</td>
        </tr>
        </tbody>
    </table>
    </center>

</div>